package com.wudl.java8.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @ClassName : User
 * @Description :
 * @Author :wudl
 * @Date: 2021-08-17 22:43
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
public class User implements Comparable<User>  {
    private  String name;
    private Integer age;


    @Override
    public int compareTo(User o) {
        return name.compareTo(o.getName());

    }
}
